<!-- 金额 -->
<template>
	<view class="container">
		<view class="content">
			<image class="bg" src="/pagesB-shop-center/static/images/amount-bg.png" mode="scaleToFill"></image>
			<view class="header border-bottom-1px">
				<view class="left">
					<text class="can-use-amount">¥12800.26</text>
					<view class="tips">
						<text class="label">可提现金额</text>
						<button class="btn btn-transition-scale9" @click="handleNavTo('/pagesB-shop-center/income-detail/index')">查看明细</button>
					</view>
				</view>
				<view class="right">
					<button class="btn btn-transition-scale9">提现</button>
				</view>
			</view>
			<view class="footer">
				<view class="item">
					<text class="amount">¥20250.32</text>
					<text class="label">累计提现金额</text>
				</view>
				<view class="item">
					<text class="amount">¥2308</text>
					<text class="label">冻结金额</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const handleNavTo = (url) => {
		uni.navigateTo({
			url
		});
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 16rpx 25rpx 0;

		.content {
			position: relative;
			z-index: 1;
			height: 346rpx;
			background: #FE344B;
			border-radius: 20rpx;
			box-sizing: border-box;
			overflow: hidden;

			.bg {
				position: absolute;
				top: 0;
				left: 0;
				z-index: -1;
				width: 100%;
				height: 100%;
			}
		}
	}

	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 192rpx;
		margin: 0 25rpx;

		&::after {
			background-color: rgba(255, 255, 255, 0.39);
		}

		.left {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			padding-left: 20rpx;

			.can-use-amount {
				font-weight: bold;
				font-size: 46rpx;
				color: #FFFFFF;
				line-height: 1.5;
			}

			.tips {
				display: flex;
				align-items: center;

				.label {
					font-size: 26rpx;
					color: #FFC6C6;
				}

				.btn {
					width: 104rpx;
					height: 34rpx;
					font-size: 20rpx;
					color: #FE344B;
					text-align: center;
					line-height: 34rpx;
					background: #FFFFFF;
					border-radius: 17rpx;
					margin-left: 12rpx;
				}
			}
		}

		.right {
			padding-right: 44rpx;

			.btn {
				width: 140rpx;
				height: 60rpx;
				font-size: 30rpx;
				color: #FE344B;
				text-align: center;
				line-height: 60rpx;
				background: #FFFFFF;
				border-radius: 30rpx;
			}
		}
	}

	.footer {
		display: flex;
		align-items: center;
		height: 154rpx;

		.item {
			flex: 1;

			.amount {
				display: block;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 1.5;
				text-align: center;
			}

			.label {
				display: block;
				font-size: 24rpx;
				color: #FFC6C6;
				line-height: 1.5;
				text-align: center;
				margin-top: 10rpx;
			}
		}
	}
</style>